package com.tomdd.config;

import com.tomdd.util.JsonUtils;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;

/**
 * @author zx
 * @date 2025-03-12 12:23
 */
@ConfigurationProperties(prefix = "wx.mp")
@Data
public class WxMpProperties {
    private Boolean useRedis;
    private RedisConfig redisConfig;

    @Data
    public static class RedisConfig {
        private String host;
        private Integer port;

    }

    private List<MPConfigs> configs;

    @Data
    private static class MPConfigs {
        private String appId;
        private String secret;
        private String token;
        private String aesKey;
    }

    @Override
    public String toString() {
        return JsonUtils.toJson(this);
    }
}
